package com.androidhuman.example.SimpleFragment;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class Main extends Activity {
	private Fragment myFragment;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        myFragment = new FragmentOne();
        
        FragmentTransaction ft =
        		getFragmentManager().beginTransaction();
        ft.add(R.id.container, myFragment);
        ft.commit();
    }
    
    public static class FragmentOne extends Fragment{

		@Override
		public View onCreateView(LayoutInflater inflater, ViewGroup container,
				Bundle savedInstanceState) {
			return inflater.inflate(R.layout.fragment_one, null);
		}    
    }
}